#!/bin/bash
#apt-get -y install libxml2-dev libxslt-dev libcurl4-openssl-dev libjpeg8-dev libpng12-dev libvpx-dev libfreetype6-dev libmcrypt-dev
#

xcode_path=$(xcode-select -p)

./configure --prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-iconv-dir=/usr/local\
--with-freetype-dir=/opt/local \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir=$xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/ \
--with-zlib=$xcode_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/ \
--with-libxml-dir=/usr \
--enable-xml \
--enable-discard-path \
--enable-magic-quotes \
--enable-safe-mode \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--with-curlwrappers \
--enable-mbregex \
--enable-fastcgi \
--enable-fpm \
--enable-force-cgi-redirect \
--enable-mbstring \
--with-mcrypt \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--without-pear \
--with-gettext \
--with-mime-magic

make clean && make && make install
